home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / nwc-x86.zip / OEMSETUP.INF < prev    next >
INI File  |  1994-01-18  |  42KB  |  1,092 lines

  1. [ProductType]
  2. STF_PRODUCT  = Winnt
  3. STF_PLATFORM = I386
  4. ;
  5. ; Language depended section
  6. ;
  7. [OptionsTextENG]
  8.     NWWKSTA       = "NetWare(R) Workstation Compatible Service"
  9.  
  10. [FileConstantsENG]
  11. NotEnoughSpace = "Out of disk space. Please remove some files before install NetWare(R) Workstation Compatible Service."
  12. InstallNWLINKFirst = "Please install the NWLINK IPX/SPX Compatible Transport before you install the NetWare(R) Workstation Compatible Service."
  13. InstallNTWKSTAFirst = "Please install the Windows NT Workstation service before you install the NetWare(R) Workstation Compatible Service."
  14. RemoveAndReboot    = "Please remove any existing NetWare(R) Workstation component and reboot your machine before installing the latest version of Netware(R) Workstation Compatible Service."
  15. UpgradeFirst = "Please install the Windows NT patch before installing the NetWare(R) Workstation Compatible Service."
  16. ProCaption   = "Windows NT Setup"
  17. ProCancel    = "Cancel"
  18. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  19.                "Are you sure you want to cancel copying files?"
  20. ProCancelCap = "Network Setup Message"
  21. ProText1     = "Copying:"
  22. ProText2     = "To:"
  23. FunctionTitle   = "Workstation Services Setup"
  24. ProductNWWKSTADescription         = "NetWare(R) Workstation Compatible Service"
  25. ProductNWRDRDescription           = "NetWare(R) Redirector Compatible Service"
  26. ProviderRDRName                 = "NetWare(R) Compatible Redirector"
  27. ProductNWWKSTATitle       = "NetWare(R) Workstation Compatible Service"
  28. ProductNWWKSTADisplayName = "NetWare(R) Workstation Compatible Service"
  29. ProductNWRDRDisplayName   = "NetWare(R) Rdr"
  30. ProductNWRDRTitle         = "NetWare(R) Redirector"
  31. ProductProviderName = "NetWare(R) Network"
  32.  
  33. [DialogConstantsENG]
  34. Help        = "&Help"
  35. Exit        = "Cancel"
  36. OK          = "OK"
  37. HelpContext = ""
  38. Continue    = "Continue"
  39. Cancel      = "Cancel"
  40. ShellCodeErrorText = "Shell Code Error"
  41.  
  42. [FileDependentDlgENG]
  43. ; nothing
  44.  
  45. [Source Media Descriptions]
  46.     1  = "NWC (December Beta) Disk #1"  , TAGFILE = nwc.2a
  47.     2  = "NWC (December Beta) Disk #2"  , TAGFILE = nwc.2b
  48.     3  = ""
  49.  
  50. [Identification]
  51.     OptionType = NetService
  52. [LanguagesSupported]
  53.     ENG
  54. [Options]
  55.     NWWKSTA
  56. [FileConstants]
  57. UtilityInf      = "UTILITY.INF"
  58. subroutineinf   = "SUBROUTN.INF"
  59. SoftwareType    = "service"
  60. Exit_Code       = 0
  61. NetwareEventDLL     = "%SystemRoot%\System32\nwevent.dll"
  62. Manufacturer    = "Microsoft"
  63. ProductMajorVersion     = "3"
  64. ProductMinorVersion     = "1"
  65. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  66. ProductNWWKSTAName        = "NWCWorkstation"
  67. ProductNWWKSTAImagePath   = "%SystemRoot%\System32\nwsvc.exe"
  68. NetRuleNWWKSTAType        = "nwWsta nwcWorkstation"
  69. NetRuleNWWKSTAClass       = {"nwcWorkstation basic"}
  70. NetRuleNWWKSTABindable    = {"nwcWorkstation nwlinkipxTransport non non 100"}
  71. NetRuleNWWKSTAUse         = $(SoftwareType)" no no"
  72. NetRuleNWWKSTABindForm    = """NwcWorkstation"" yes yes container"
  73. ProductNWRDRName          = "NwRdr"
  74. ProductNWRDRImagePath     = "\SystemRoot\System32\drivers\nwrdr.sys"
  75. ProductProviderImagePath = "%SystemRoot%\System32\nwprovau.dll"
  76. ProviderName            = $(ProductNWWKSTAName)
  77. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  78. ParamKeyName    = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Parameters"
  79. LSAKeyName      = "System\CurrentControlSet\Control\LSA"
  80. [GeneralConstants]
  81. from      = ""
  82. to        = ""
  83. ExitCodeOk     = 0
  84. ExitCodeCancel = 1
  85. ExitCodeFatal  = 2
  86. KeyNull         = ""
  87. MAXIMUM_ALLOWED   = 33554432
  88. RegistryErrorIndex = NO_ERROR
  89. KeyProduct      = ""
  90. KeyParameters   = ""
  91. TRUE            = 1
  92. FALSE           = 0
  93. NoTitle            = 0
  94. ExitState   = "Active"
  95. OldVersionExisted = $(FALSE)
  96. DriverPath      = $(!STF_NTPATH)\drivers
  97. [date]
  98.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  99.  
  100. [DetectDiskSpace]
  101.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  102.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  103.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  104.  
  105. [DetectSystemMemory]
  106.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  107.  
  108. [Identify]
  109.     read-syms Identification
  110.     set Status     = STATUS_SUCCESSFUL
  111.     set Identifier = $(OptionType)
  112.     set Media      = #("Source Media Descriptions", 1, 1)
  113.     Return $(Status) $(Identifier) $(Media)
  114. [ReturnOptions]
  115.     set Status        = STATUS_FAILED
  116.     set OptionList     = {}
  117.     set OptionTextList = {}
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.         goto returnoptions
  121.     else
  122.         set Status = STATUS_NOLANGUAGE
  123.         goto finish_ReturnOptions
  124.     endif
  125. returnoptions = +
  126.     set OptionList     = ^(Options, 1)
  127.     set OptionTextList = ^(OptionsText$($0), 1)
  128.     set Status         = STATUS_SUCCESSFUL
  129. finish_ReturnOptions = +
  130.     Return $(Status) $(OptionList) $(OptionTextList)
  131. [InstallOption]
  132.     set Option   = $($1)
  133.     set SrcDir   = $($2)
  134.     set AddCopy  = $($3)
  135.     set DoCopy   = $($4)
  136.     set DoConfig = $($5)
  137.     set LanguageList = ^(LanguagesSupported, 1)
  138.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  139.         Return STATUS_NOLANGUAGE
  140.     endif
  141.     Debug-Output "OEMNSVNW.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  142.     Debug-Output "OEMNSVNW.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  143.     set-subst LF = "\n"
  144.     set-subst CR = "\r"
  145.     read-syms GeneralConstants
  146.     read-syms FileConstants
  147.     read-syms DialogConstants$(!STF_LANGUAGE)
  148.     ifstr(i) $(!NTN_Origination) == "NCPA"
  149.         set Continue = $(OK)
  150.     endif
  151.     read-syms FileConstants$(!STF_LANGUAGE)
  152.     detect date
  153.     detect DetectSystemMemory
  154.     detect DetectDiskSpace
  155.     set-title  $(FunctionTitle)
  156.     set to   = Begin
  157.     set from = Begin
  158.     set CommonStatus = STATUS_SUCCESSFUL
  159.     EndWait
  160. Begin = +
  161.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  162.         set OEM_ABANDON_OPTIONS = { $(ProductNWWKSTAName), +
  163.             $(ProductNWRDRName)}
  164.         set StartLabel = removeadapter
  165.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  166.         set StartLabel = UpgradeSoftware
  167.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  168.         set StartLabel = bindingadapter
  169.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  170.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  171.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  172.             Debug-Output "OEMNSVNW.INF: ShellCode error: cannot get an error string."
  173.             goto ShellCodeError
  174.         endif
  175.         set Error = $($R0)
  176.         set from = end
  177.         set to = end
  178.         goto nonfatalinfo
  179.     else
  180.         set StartLabel = installadapter
  181.         set OEM_ABANDON_OPTIONS = {}
  182.     endif
  183.     set DoWKSTA         = FALSE
  184.     set DoRDR           = FALSE
  185.     set DoNWLINK        = FALSE
  186.     set DoMUP           = FALSE
  187.     Ifstr(i) $(Option) == NWWKSTA
  188.         set DoWKSTA     = TRUE
  189.         set DoRDR       = TRUE
  190.         set DoNWLINK    = TRUE
  191.         set DoMUP       = TRUE
  192.     Else-ifstr(i) $(Option) == RDR
  193.         Set DoRDR = TRUE
  194.     Else
  195.         Debug-Output "OEMNSVWK.INF: Unrecognized option"
  196.     Endif
  197.     set from = $(fatal)
  198.     set to = $(fatal)
  199.     goto $(StartLabel)
  200. installadapter = +
  201.     GetDriveInPath NtDrive $(!STF_WINDOWSSYSPATH)
  202.     Shell "" GetFilesSize
  203.     set RequiredSize = $($R0)
  204.     ForListDo $(VolumeList)
  205.           set CurrentVolume = *($(VolumeList), $(#))
  206.           set CurrentVolumeFree  = *($(VolumeFreeList), $(#))
  207.           Ifstr(i) $(CurrentVolume) == $(NtDrive)
  208.               set-mul CurrentVolumeFree = $(CurrentVolumeFree) 1024
  209.               Ifint $(CurrentVolumeFree) < $(RequiredSize)
  210.                   Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(NotEnoughSpace)
  211.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  212.                       goto ShellCodeError
  213.                   endif
  214.                   goto end
  215.               else
  216.                   goto AfterCheckSpace
  217.               endif
  218.           EndIf
  219.     EndForListDo
  220. AfterCheckSpace = +
  221.  
  222.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLINKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  223.  
  224.     Ifstr $(BS_KeyServices) == $(KeyNull)
  225.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(InstallNWLINKFirst)
  226.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  227.             goto ShellCodeError
  228.         endif
  229.         goto end
  230.     endif
  231.  
  232.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  233.     Ifstr $(KeyProduct) != $(KeyNull)
  234.         CloseRegKey $(KeyProduct)
  235.         Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  236.             $(ProductVersion)
  237.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.             Debug-Output "OEMNSVNW.INF: ShellCode error: cannot get an error string."
  239.             goto ShellCodeError
  240.         endif
  241.         goto end
  242.     endif
  243.     CloseRegKey $(KeyProduct)
  244.  
  245.     ;
  246.     ; Make sure Mup exists
  247.     ; 
  248.     ifstr(i) $(DoMUP) == TRUE
  249.         ;
  250.         ; Check whether MUP exists or not.
  251.         ; If exists, continue.
  252.         ; Otherwise, popup a dialog and end
  253.         ;
  254.         Debug-Output "OEMNSVNW.INF: check MUP registry"
  255.  
  256.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Mup" $(MAXIMUM_ALLOWED) MupKey
  257.  
  258.         Ifstr $(MupKey) == $(KeyNull)
  259.             ;
  260.             ; Mup does not exist. So, end NWCS setup.
  261.             ;
  262.             Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(InstallNTWKSTAFirst)
  263.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  264.                 goto ShellCodeError
  265.             endif
  266.             goto end
  267.         endif
  268.  
  269.         ;
  270.         ; It exists. So, continue.
  271.         ;
  272.         CloseRegKey $(MupKey)
  273.     endif
  274.  
  275.     ;
  276.     ; Check to make sure that NETWAREWORKSTATION is not there
  277.     ;
  278.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetwareWorkstation" $(MAXIMUM_ALLOWED) BS_KeyServices
  279.  
  280.     Ifstr $(BS_KeyServices) == $(KeyNull)
  281.         ;
  282.         ; Good. Let check the "Mark for deletion" service controller problem.
  283.         ;
  284.         Shell $(UtilityInf), CreateService, +
  285.             "NetwareWorkstation", +
  286.             $(ProductNWWKSTADisplayName), +
  287.             $(ProductNWWKSTAImagePath), "autoserviceshare", "NetworkProvider", {}, "",+
  288.             $(NetwareEventDLL)
  289.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  290.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  291.             goto ShellCodeError
  292.         endif
  293.         debug-output $($R0)
  294.         set RegistryErrorIndex = $($R0)
  295.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  296.             ;
  297.             ; it is still there
  298.             ;
  299.             Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(RemoveAndReboot)
  300.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  301.                 goto ShellCodeError
  302.             endif
  303.             goto end
  304.         else
  305.             Shell $(UtilityInf) RemoveService "NetwareWorkstation" "YES"
  306.         endif
  307.     else
  308.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(RemoveAndReboot)
  309.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  310.             goto ShellCodeError
  311.         endif
  312.         CloseRegKey $(BS_KeyServices)
  313.         goto end
  314.     endif
  315.  
  316.  
  317.     goto nextstep
  318. nextstep = +
  319.     StartWait
  320.     Ifstr(i) $(!NTN_InstallMode) == install
  321.         Ifint $(OldVersionExisted) == $(FALSE)
  322.             goto installproduct
  323.         endif
  324.     endif
  325.     goto writeparameters
  326. installproduct = +
  327.     CloseRegKey $(ParamKeyName)
  328.     ifstr(i) $(!NTN_InstallMode) == "install"
  329.         Ifstr(i) $(DoCopy) == "YES"
  330.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  331.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  332.                Goto ShellCodeError
  333.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  334.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  335.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  336.                    goto ShellCodeError
  337.                endif
  338.                set Error = $($R0)
  339.                Goto fatal
  340.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  341.                Goto successful
  342.            Endif
  343.            Set SrcDir = $($R1)
  344.         Endif
  345.         install "Install-nwcfgdll"
  346.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  347.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  348.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  349.                goto ShellCodeError
  350.            endif
  351.            set Error = $($R0)
  352.            goto fatal
  353.         endif
  354.     endif
  355.     set OEM_ABANDON_ON  = TRUE
  356.     LoadLibrary "nw" $(!STF_CWDDIR)\nwcfg.dll !NWCFG_HANDLE
  357.     Set FLibraryErrCtl = 1
  358.     ;
  359.     ; Check the version number
  360.     ;
  361.     LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  362.     ifint *($(Result),3) < 528
  363.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(UpgradeFirst)
  364.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  365.             goto ShellCodeError
  366.         endif
  367.         goto end
  368.         FreeLibrary $(!NWCFG_HANDLE)
  369.     endif
  370.  
  371.     ifstr(i) $(!NTN_InstallMode) == "install"
  372.         install "Install-Option"
  373.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  374.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  375.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376.                goto ShellCodeError
  377.            endif
  378.            set Error = $($R0)
  379.            goto fatal
  380.         endif
  381.     endif
  382.  
  383.     LibraryProcedure Result $(!NWCFG_HANDLE), SetFileSysChangeValue
  384.     LibraryProcedure Result $(!NWCFG_HANDLE), AddNetwarePrinterProvidor
  385.     Set FLibraryErrCtl = 0
  386.     ;
  387.     ; Change netware to the top provider
  388.     ;
  389.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers" $(MAXIMUM_ALLOWED) PrintProviderKey
  390.     Ifstr $(PrintProviderKey) != $(KeyNull)
  391.         GetRegValue $(PrintProviderKey),"Order",OrderInfo
  392.         set OrderList = *($(OrderInfo),4)
  393.         set NewOrderList = {$(ProductProviderName)}
  394.         ForListDo  $(OrderList)
  395.             ifstr(i) $($) != $(ProductProviderName)
  396.                 set NewOrderList = >($(NewOrderList),$($))
  397.             endif
  398.         EndForListDo
  399.         SetRegValue $(PrintProviderKey) {"Order",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewOrderList)}
  400.         CloseRegKey $(PrintProviderKey)
  401.     endif
  402.  
  403.     ;
  404.     ; Set Authentication packages
  405.     ;
  406.  
  407.     OpenRegKey $(!REG_H_LOCAL) "" $(LSAKeyName) $(MAXIMUM_ALLOWED) LSAKey
  408.     Ifstr $(LSAKey) != $(KeyNull)
  409.         GetRegValue $(LSAKey),"Authentication Packages", PackagesInfo
  410.         set Packages = *($(PackagesInfo), 4)
  411.         ifcontains(i) "nwprovau" in $(Packages)
  412.             ; don't do it
  413.             debug-output "Authentication Packages already exist."
  414.         else
  415.             ifstr(i) $(Packages) == ""
  416.                 set Packages = {"nwprovau"}
  417.             else
  418.                 set Packages = >($(Packages),"nwprovau")
  419.             endif
  420.             SetRegValue $(LSAKey) {"Authentication Packages",$(NoTitle),$(!REG_VT_MULTI_SZ),$(Packages)}
  421.         endif
  422.         CloseRegKey $(LSAKey)
  423.     endif
  424.  
  425.     ifstr(i) $(DoWKSTA) == TRUE
  426.         Debug-Output "OEMNSVNW.INF: Install Workstation in registry."
  427.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductNWWKSTAName))
  428.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  429.             $(ProductNWWKSTAName), +
  430.             $(ProductNWWKSTAName), +
  431.             $(ProductNWWKSTADisplayName), $(STF_CONTEXTINFNAME), +
  432.             $(ProductNWWKSTAImagePath), "autoserviceshare", "NetworkProvider", {}, "",+
  433.             $(NetwareEventDLL)
  434.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  436.             goto ShellCodeError
  437.         endif
  438.         set RegistryErrorIndex = $($R0)
  439.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  440.             EndWait
  441.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  442.             CloseRegKey $($R1)
  443.             CloseRegKey $($R2)
  444.             CloseRegKey $($R3)
  445.             CloseRegKey $($R4)
  446.             CloseRegKey $($R5)
  447.             goto fatalregistry
  448.         endif
  449.         Set SoftProductKey      = $($R1)
  450.         Set SoftNetRuleKey      = $($R2)
  451.         Set SoftServiceKey      = $($R3)
  452.         Set SoftParameterKey    = $($R4)
  453.         Set SoftLinkageKey      = $($R5)
  454.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  455.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  456.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  457.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTATitle)},+
  458.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTADescription)},+
  459.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTAName)},+
  460.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  461.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  462.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  463.             Debug-Output "OEMNSVNW.INF: ShellCode error."
  464.             goto ShellCodeError
  465.         endif
  466.         set RegistryErrorIndex = $($R0)
  467.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  468.             EndWait
  469.             Debug-Output "OEMNSVNW.INF: registry error: add value list."
  470.             CloseRegKey $(SoftProductKey)
  471.             CloseRegKey $(SoftNetRuleKey)
  472.             CloseRegKey $(SoftServiceKey)
  473.             CloseRegKey $(SoftLinkageKey)
  474.             CloseRegKey $(SoftParameterKey)
  475.             goto fatalregistry
  476.         endif
  477.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTAType)},+
  478.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWWKSTAClass)}, +
  479.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTAUse)}, +
  480.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTABindForm)}, +
  481.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWWKSTABindable)}, +
  482.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),NWWKSTA}}
  483.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  484.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  485.             Debug-Output "OEMNSVNW.INF: ShellCode error."
  486.             goto ShellCodeError
  487.         endif
  488.         set RegistryErrorIndex = $($R0)
  489.         CloseRegKey $(SoftProductKey)
  490.         CloseRegKey $(SoftNetRuleKey)
  491.         CloseRegKey $(SoftServiceKey)
  492.  
  493.         Shell "" AddParameterKey $(SoftParameterKey)
  494.         CloseRegKey $(SoftParameterKey)
  495.  
  496.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  497.             CloseRegKey $(SoftLinkageKey)
  498.             EndWait
  499.             Debug-Output "OEMNSVNW.INF: Registry error: add value list."
  500.             goto fatalregistry
  501.         endif
  502.         set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"Mup"}}}
  503.         Shell  $(UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  504.         CloseRegKey $(SoftLinkageKey)
  505.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  506.             Debug-Output "OEMNSVNW.INF: ShellCode error."
  507.             goto ShellCodeError
  508.         endif
  509.         set RegistryErrorIndex = $($R0)
  510.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  511.             EndWait
  512.             Debug-Output "OEMNSVNW.INF: registry error: add value list."
  513.             goto fatalregistry
  514.         endif
  515.  
  516.         ; Remove autoexec.nt statements
  517.         ;
  518.         Set FLibraryErrCtl = 1
  519.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "REM Install network redirector"$(LF)
  520.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\nw16"$(LF)
  521.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\vwipxspx"$(LF)
  522.         ;
  523.         ; Setup string in autoexec.nt
  524.         ;
  525.         LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "REM Install network redirector"$(CR)$(LF)
  526.         LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\nw16"$(CR)$(LF)
  527.         LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\vwipxspx"$(CR)$(LF)
  528.         Set FLibraryErrCtl = 0
  529.     endif
  530.  
  531.     ifstr(i) $(DoNWLINK) == TRUE
  532.         ;
  533.         ; Increase the reference counter
  534.         ;
  535.         Shell "utility.inf", IncrementRefCount, "Software\Microsoft\NWLINKIPX\CurrentVersion"
  536.     endif
  537.  
  538.     ifstr(i) $(DoRDR) == TRUE
  539.         Debug-Output "OEMNSVNW.INF: Install Rdr registry"
  540.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductNWRDRName))
  541.         Shell $(UtilityInf), CreateService, $(ProductNWRDRName), +
  542.             $(ProductNWRDRDisplayName), $(ProductNWRDRImagePath), +
  543.             "system", "Network", {}, "", +
  544.             $(NetwareEventDLL)
  545.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  546.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  547.             goto ShellCodeError
  548.         endif
  549.         set RegistryErrorIndex = $($R0)
  550.         set NWRdrServiceKey = $($R1)
  551.         CloseRegKey $($R2)
  552.         CloseRegKey $($R3)
  553.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  554.             EndWait
  555.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  556.             goto fatalregistry
  557.         endif
  558.  
  559.         ;
  560.         ;  Add performance monitoring info
  561.         ;
  562.         CreateRegKey $(NWRdrServiceKey) {"Performance",$(NoTitle),GenericClass} "" +
  563.                 $(MAXIMUM_ALLOWED) "" KeyPerformance
  564.  
  565.         set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfnw.dll"},+
  566.                            {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNetWarePerformanceData"},+
  567.                            {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNetWarePerformanceData"},+
  568.                            {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNetWarePerformanceData"}}
  569.  
  570.         Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  571.  
  572.         set RegistryErrorIndex = $($R0)
  573.  
  574.         CloseRegKey $(KeyPerformance)
  575.         CloseRegKey $(NWRdrServiceKey)
  576.  
  577.         ;
  578.         ; Create performance help information
  579.         ;
  580.  
  581.         LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  582.         ifint *($(Result),3) < 529
  583.             Set FLibraryErrCtl = 1
  584.             LibraryProcedure STATUS $(!NWCFG_HANDLE), lodctr $(!STF_WINDOWSSYSPATH)\nwperf.ini
  585.             ; Ignore the error code for now
  586.             Set FLibraryErrCtl = 0
  587.         else
  588.             StartDetachedProcess STATUS "" "" $(!STF_WINDOWSSYSPATH)"\lodctr.exe" "nwperf.ini"
  589.             ifstr(i) $(STATUS) == "ERROR"
  590.                 debug-output "Cannot detached process"
  591.             endif
  592.         endif
  593.  
  594.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  595.             EndWait
  596.             Debug-Output "OEMNSVNW.INF: Registry error: add performance information"
  597.             goto fatalregistry
  598.         endif
  599.  
  600.         Debug-Output "OEMNSVNW.INF: Add NetworkProvider"
  601.         Shell $(UtilityInf), AddNetworkProvider, $(ProviderName), +
  602.             $(ProductProviderImagePath), $(ProductProviderName), "nwrdr"
  603.         set RegistryErrorIndex = $($R0)
  604.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  605.             EndWait
  606.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  607.             goto fatalregistry
  608.         endif
  609.  
  610.         ;
  611.         ; Put netware provider to the top of the order list
  612.         ;
  613.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider\Order" $(MAXIMUM_ALLOWED) NetProviderKey
  614.         Ifstr $(NetProviderKey) != $(KeyNull)
  615.             GetRegValue $(NetProviderKey),"ProviderOrder",OrderInfo
  616.             set OrderList = *($(OrderInfo),4)
  617.             Split-String $(OrderList), ",", ProviderList
  618.             set NewOrderList = $(ProductNWWKSTAName)
  619.             ForListDo  $(ProviderList)
  620.                 ifstr(i) $($) != ","
  621.                     ifstr(i) $($) != $(ProductNWWKSTAName)
  622.                         set NewOrderList = $(NewOrderList)","$($)
  623.                     endif
  624.                 endif
  625.             EndForListDo
  626.             SetRegValue $(NetProviderKey) {"ProviderOrder",$(NoTitle),$(!REG_VT_SZ),$(NewOrderList)}
  627.             CloseRegKey $(NetProviderKey)
  628.         endif
  629.  
  630.         Shell "" AddShortName
  631.  
  632.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProviderName)"\networkprovider" $(MAXIMUM_ALLOWED) ProviderKey
  633.         ifstr(i) $(ProviderKey) != ""
  634.             set NewValueList = {{Class,$(NoTitle),$(!REG_VT_DWORD),3}}
  635.             Shell $(UtilityInf) AddValueList $(ProviderKey) $(NewValueList)
  636.         endif
  637.         CloseRegKey $(ProviderKey)
  638.  
  639.         LibraryProcedure Status1, $(!LIBHANDLE), CheckFileExistance, $(!STF_WINDOWSSYSPATH)"\novell.cpl"
  640.         ifstr(i) $(Status1) == "YES"
  641.             LibraryProcedure Status2, $(!LIBHANDLE), RenFile, $(!STF_WINDOWSSYSPATH)"\novell.cpl", $(!STF_WINDOWSSYSPATH)"\novell.bak"
  642.         endif
  643.  
  644.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\WOW" $(MAXIMUM_ALLOWED) WowKey
  645.         ifstr(i) $(WowKey) != ""
  646.             GetRegValue $(WowKey),"KnownDLLS", KnownDLLsInfo
  647.             Split-String *($(KnownDLLsInfo),4), " ", KnownDLLsList
  648.             Ifcontains(i) "netware.drv" not-in $(KnownDLLsList)
  649.                 ifstr(i) *($(KnownDLLsInfo),4) == ""
  650.                     set KnownDLLs = "netware.drv"
  651.                 else
  652.                     set KnownDLLs = *($(KnownDLLsInfo),4)" netware.drv"
  653.                 endif
  654.                 SetRegValue $(WowKey) {"KnownDLLS",$(NoTitle),$(!REG_VT_SZ),$(KnownDLLs)}
  655.             endif
  656.             CloseRegKey $(WowKey)
  657.         endif
  658.  
  659.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\LanmanServer\Parameters" $(MAXIMUM_ALLOWED) ServerParmKey
  660.         ifstr(i) $(ServerParmKey) != ""
  661.             SetRegValue $(ServerParmKey) {"EnableSharedNetDrives",$(NoTitle),$(!REG_VT_DWORD),1}
  662.             CloseRegKey $(ServerParmKey)
  663.         endif
  664.     endif
  665. writeparameters = +
  666.  
  667.     FreeLibrary $(!NWCFG_HANDLE)
  668.  
  669.     EndWait
  670.     goto successful
  671. ConfigureBrowser = +
  672.     goto successful
  673. bindingadapter =+
  674.     set Error = "Binding: Sorry, not yet implemented."
  675.     goto fatal
  676. removeadapter = +
  677.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\WOW" $(MAXIMUM_ALLOWED) WowKey
  678.     ifstr(i) $(WowKey) != ""
  679.         GetRegValue $(WowKey),"KnownDLLS", KnownDLLsInfo
  680.         Split-String *($(KnownDLLsInfo),4), " ", KnownDLLsList
  681.         set KnownDLLs = ""
  682.         Ifcontains(i) "netware.drv" in $(KnownDLLsList)
  683.             ForListDo $(KnownDLLsList)
  684.                 ifstr(i) $($) != " "
  685.                     ifstr(i) $($) != "netware.drv"
  686.                         ifstr(i) $(KnownDLLs) == ""
  687.                             set KnownDLLs = $($)
  688.                         else
  689.                             set KnownDLLs = $(KnownDLLs)" "$($)
  690.                         endif
  691.                     endif
  692.                 endif
  693.             EndForListDo
  694.         else
  695.             set KnownDLLs = *($(KnownDLLsInfo),4)
  696.         endif
  697.         SetRegValue $(WowKey) {"KnownDLLS",$(NoTitle),$(!REG_VT_SZ),$(KnownDLLs)}
  698.         CloseRegKey $(WowKey)
  699.     endif
  700.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\LanmanServer\Parameters" $(MAXIMUM_ALLOWED) ServerParmKey
  701.     ifstr(i) $(ServerParmKey) != ""
  702.         SetRegValue $(ServerParmKey) {"EnableSharedNetDrives",$(NoTitle),$(!REG_VT_DWORD),0}
  703.         CloseRegKey $(ServerParmKey)
  704.     endif
  705.  
  706.     LoadLibrary "nw" $(!STF_CWDDIR)\nwcfg.dll !NWCFG_HANDLE
  707.     Set FLibraryErrCtl = 1
  708.     LibraryProcedure Result $(!NWCFG_HANDLE), DeleteNetwarePrinterProvidor
  709.     LibraryProcedure Result $(!NWCFG_HANDLE), DeleteGatewayPassword
  710.     Set FLibraryErrCtl = 0
  711.  
  712.     LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  713.     ifint *($(Result),3) < 529
  714.         Set FLibraryErrCtl = 1
  715.         LibraryProcedure STATUS $(!NWCFG_HANDLE), unlodctr nwrdr
  716.         ; Ignore the error code for now
  717.         Set FLibraryErrCtl = 0
  718.     else
  719.         StartDetachedProcess STATUS "" "" $(!STF_WINDOWSSYSPATH)"\unlodctr.exe" "nwrdr"
  720.         ifstr(i) $(STATUS) == "ERROR"
  721.             debug-output "Cannot detached process"
  722.         endif
  723.     endif
  724.  
  725.     ;
  726.     ; remove Authentication Packages
  727.     ;
  728.     OpenRegKey $(!REG_H_LOCAL) "" $(LSAKeyName) $(MAXIMUM_ALLOWED) LSAKey
  729.     Ifstr $(LSAKey) != $(KeyNull)
  730.         GetRegValue $(LSAKey),"Authentication Packages", PackagesInfo
  731.         set Packages = *($(PackagesInfo), 4)
  732.         ifcontains(i) "nwprovau" not-in $(Packages)
  733.             ; don't do it
  734.             ; something wrong....
  735.             debug-output "Authentication Packages does not exist.."
  736.         else
  737.             set NewPackages = {}
  738.             ForListDo $(Packages)
  739.                 ifstr(i) $($) != "nwprovau"
  740.                     ifstr(i) $(NewPackages) == {}
  741.                         set NewPackages = {$($)}
  742.                     else
  743.                         set NewPackages = >($(NewPackages),$($))
  744.                     endif
  745.                 endif
  746.             EndForListDo
  747.             SetRegValue $(LSAKey) {"Authentication Packages",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewPackages)}
  748.         endif
  749.         CloseRegKey $(LSAKey)
  750.     endif
  751.  
  752.     ifcontains(i) $(ProductNWWKSTAName) in $(OEM_ABANDON_OPTIONS)
  753.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  754.            $(ProductNWWKSTAName)
  755.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  756.            Debug-Output "OEMNSVNW.INF: ShellCode error"
  757.            goto ShellCodeError
  758.         endif
  759.         set RegistryErrorIndex = $($R0)
  760.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  761.            goto fatalregistry
  762.         endif
  763.     endif
  764.     ForListDo  {$(ProductNWRDRName)}
  765.         ifcontains(i) $($) in $(OEM_ABANDON_OPTIONS)
  766.            Shell $(UtilityInf), RemoveService, $($), "YES"
  767.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  768.                Debug-Output "OEMNSVNW.INF: ShellCode error"
  769.                goto ShellCodeError
  770.            endif
  771.            set RegistryErrorIndex = $($R0)
  772.            Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  773.                goto fatalregistry
  774.            endif
  775.         endif
  776.     EndForListDo
  777.     Shell "UTILITY.INF", DecrementRefCount, "Software\Microsoft\NWLINKIPX\CurrentVersion"
  778.     ;
  779.     ; Remove autoexec.nt statements
  780.     ;
  781.     Set FLibraryErrCtl = 1
  782.     LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "REM Install network redirector"$(LF)
  783.     LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\nw16"$(LF)
  784.     LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\vwipxspx"$(LF)
  785.     Set FLibraryErrCtl = 0
  786.  
  787.     Shell $(UtilityInf) RemoveNetworkProvider $(ProviderName)
  788.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  789.         Debug-Output "OEMNSVNW.INF: ShellCode error"
  790.         goto ShellCodeError
  791.     endif
  792.     set RegistryErrorIndex = $($R0)
  793.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  794.         goto fatalregistry
  795.     endif
  796.  
  797.     ;
  798.     ; Remove ShrotName
  799.     ;
  800.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider\ShortName" $(MAXIMUM_ALLOWED) ShortNameKey
  801.     ifstr $(ShortNameKey) != $(KeyNull)
  802.          DeleteRegValue $(ShortNameKey) "NW"
  803.     else
  804.         ;
  805.         ; we must be able to open the provider key
  806.         ;
  807.         debug-output "something wrong..."
  808.     endif
  809.  
  810.     FreeLibrary $(!NWCFG_HANDLE)
  811.  
  812.     Install "RestoreFiles"
  813.  
  814.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwc.cpl"
  815.  
  816.     Shell "" RemoveBackupFiles
  817.  
  818.     goto end
  819. UpgradeSoftware = +
  820.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(RemoveAndReboot)
  821.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  822.         goto ShellCodeError
  823.     endif
  824.     goto end
  825. successful = +
  826.     goto end
  827. warning = +
  828.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  829.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  830.         goto ShellCodeError
  831.     endif
  832.     ifstr(i) $($R1) == "OK"
  833.         goto $(to)
  834.     else-ifstr(i) $($R1) == "CANCEL"
  835.         goto $(from)
  836.     else
  837.         goto end
  838.     endif
  839. nonfatalinfo = +
  840.     Set CommonStatus = STATUS_USERCANCEL
  841.     Set Severity = STATUS
  842.     goto nonfatalmsg
  843. nonfatal = +
  844.     Set Severity = NONFATAL
  845.     goto nonfatalmsg
  846. nonfatalmsg = +
  847.     ifstr(i) $(Error) == ""
  848.         Set Severity = NONFATAL
  849.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  850.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851.             goto ShellCodeError
  852.         endif
  853.         set Error = $($R0)
  854.     endif
  855.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  856.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  857.         goto ShellCodeError
  858.     endif
  859.     ifstr(i) $($R1) == "OK"
  860.         goto $(from)
  861.     else
  862.         goto "end"
  863.     endif
  864. fatalregistry = +
  865.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  866.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  867.         goto ShellCodeError
  868.     endif
  869.     set Error = $($R0)
  870.     goto fatal
  871. fatal = +
  872.     ifstr(i) $(Error) == ""
  873.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  874.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  875.             goto ShellCodeError
  876.         endif
  877.         set Error = $($R0)
  878.     endif
  879.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  880.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  881.         goto ShellCodeError
  882.     endif
  883.     goto setfailed
  884. ShellCodeError = +
  885.     set DlgType      = "MessageBox"
  886.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  887.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  888.     set STF_MB_TYPE  = 1
  889.     set STF_MB_ICON  = 3
  890.     set STF_MB_DEF   = 1
  891.     ui start "Error Message"
  892.     goto setfailed
  893. setfailed = +
  894.     set CommonStatus = STATUS_FAILED
  895.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  896.         set OEM_ABANDON_ON = FALSE
  897.         goto removeadapter
  898.     endif
  899.     goto end
  900. end = +
  901.     goto term
  902. term = +
  903.     Return $(CommonStatus)
  904. [RestoreFiles]                                                              
  905.     AddSectionFilesToCopyList Restore-Oldexe $(!STF_WINDOWSSYSPATH) $(!STF_WINDOWSSYSPATH)         
  906.     AddSectionFilesToCopyList Restore-Oldsys $(!STF_WINDOWSSYSPATH)\drivers $(!STF_WINDOWSSYSPATH)\drivers 
  907.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  908.     CopyFilesInCopyList
  909.     Exit
  910. [Install-nwcfgdll]
  911.     set STF_VITAL = ""
  912.     ifstr(i) $(AddCopy) == "YES"
  913.         AddSectionFilesToCopyList Files-nwcfgdll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  914.     endif
  915.     ifstr(i) $(DoCopy) == "YES"
  916.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  917.        CopyFilesInCopyList
  918.     endif
  919.     Exit
  920. [Install-Option]
  921.     set STF_VITAL = ""
  922.     ifstr(i) $(AddCopy) == "YES"
  923.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  924.         AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  925.     endif
  926.     ifstr(i) $(DoCopy) == "YES"
  927.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  928.        CopyFilesInCopyList
  929.     endif
  930.     ifstr(i) $(DoConfig) == "YES"
  931.     endif
  932.     Exit
  933. [Install-Update]
  934.    set STF_VITAL        = ""
  935.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  936.    AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  937.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  938.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  939.    CopyFilesInCopyList
  940.    Exit
  941.  
  942. [AddShortName]
  943.     read-syms GeneralConstants
  944.     read-syms FileConstants
  945.     read-syms FileConstants$(!STF_LANGUAGE)
  946.     ;
  947.     ; Create Short name
  948.     ;
  949.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider" $(MAXIMUM_ALLOWED) NetProviderKey
  950.     ifstr $(NetProviderKey) != $(KeyNull)
  951.         OpenRegKey $(NetProviderKey) "" "ShortName" $(MAXIMUM_ALLOWED) ShortNameKey
  952.         ifstr $(ShortNameKey) == $(KeyNull)
  953.             ;
  954.             ; Create short key if we cannot open it
  955.             ;
  956.             CreateRegKey $(NetProviderKey) {"ShortName",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ShortNameKey
  957.         endif
  958.         ifstr $(ShortNameKey) != $(KeyNull)
  959.             SetRegValue $(ShortNameKey) {"NW",$(NoTitle),$(!REG_VT_SZ),$(ProductProviderName)}
  960.         endif
  961.     else
  962.         ;
  963.         ; we must be able to open the provider key
  964.         ;
  965.         debug-output "something wrong..."
  966.     endif
  967.  
  968.     return
  969.  
  970. [AddParameterKey]
  971.    read-syms GeneralConstants
  972.    set SoftParameterKey = $($0)
  973.    CreateRegKey $(SoftParameterKey) {"Logon",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" LogonKey
  974.    CreateRegKey $(SoftParameterKey) {"Option",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" OptionKey
  975.  
  976.    Set FLibraryErrCtl = 1
  977.    ;
  978.    ; 2 is the equal to SetValue
  979.    ;
  980.    LibraryProcedure Result $(!NWCFG_HANDLE), SetEverybodyPermission, $(OptionKey), 2
  981.    Set FLibraryErrCtl = 0
  982.  
  983.    CloseRegKey $(LogonKey)
  984.    CloseRegKey $(OptionKey)
  985.  
  986.    Return
  987.  
  988. [GetFilesSize]
  989.     set FileSizeList = >(^(Files-Drivers,3),^(Files-NWWKSTA,3))
  990.     set TotalSize = 0
  991.     ForListDo $(FileSizeList)
  992.         ForListDo $($)
  993.             Debug-Output $($)
  994.             Split-String $($) "=" SplitString
  995.             set Size = *($(SplitString),3)
  996.             set-add TotalSize = $(TotalSize) $(Size)
  997.         EndForListDo
  998.     EndForListDo
  999.     set-div SizeInK = $(TotalSize) 1024
  1000.     return $(SizeInK)
  1001.  
  1002. [Files-Inf]
  1003. 1,      oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  1004. [RemoveBackupFiles]
  1005.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nethlp.nwc"
  1006.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\net.nwc"
  1007.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\netmsg.nwc"
  1008.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\srvsvc.nwc"
  1009.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\ncpa.nwc"
  1010.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\wfwnet.nwc"
  1011.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\vdmredir.nwc"
  1012.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\ipxroute.nwc"
  1013.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwlnkmsg.nwc"
  1014.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwnblink.nwc"
  1015.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\wshnwlnk.nwc"
  1016.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwlnkcfg.nwc"
  1017.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwlnksvc.nwc"
  1018.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwnbexe.nwc"
  1019.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\drivers\srv.nwc"
  1020.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\drivers\nwlink.nwc"
  1021.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\drivers\nwnblink.nwc"
  1022.     return 
  1023.  
  1024. [Restore-Oldsys]
  1025. 3,srv.nwc     , SIZE=0, RENAME=srv.sys
  1026. 3,nwlink.nwc  , SIZE=0, RENAME=nwlink.sys
  1027. 3,nwnblink.nwc, SIZE=0, RENAME=nwnblink.sys
  1028.  
  1029. [Restore-Oldexe]
  1030. 3,nethlp.nwc  , SIZE=0, RENAME=net.hlp
  1031. 3,net.nwc     , SIZE=0, RENAME=net.exe
  1032. 3,netmsg.nwc  , SIZE=0, RENAME=netmsg.dll
  1033. 3,srvsvc.nwc  , SIZE=0, RENAME=srvsvc.dll
  1034. 3,ncpa.nwc    , SIZE=0, RENAME=ncpa.cpl
  1035. 3,wfwnet.nwc  , SIZE=0, RENAME=wfwnet.drv
  1036. 3,vdmredir.nwc, SIZE=0, RENAME=vdmredir.dll
  1037.  
  1038. 3,ipxroute.nwc, SIZE=0, RENAME=ipxroute.exe
  1039. 3,nwlnkmsg.nwc, SIZE=0, RENAME=nwlnkmsg.dll
  1040. 3,nwnblink.nwc, SIZE=0, RENAME=nwnblink.dll
  1041. 3,wshnwlnk.nwc, SIZE=0, RENAME=wshnwlnk.dll
  1042. 3,nwlnkcfg.nwc, SIZE=0, RENAME=nwlnkcfg.dll
  1043. 3,nwlnksvc.nwc, SIZE=0, RENAME=nwlnksvc.exe
  1044. 3,nwnbexe.nwc , SIZE=0, RENAME=nwnblink.exe
  1045.  
  1046. [Files-Drivers]
  1047. 1,nwrdr.sys, SIZE=999
  1048. 1,srv.sys, SIZE=999,      BACKUP=srv.nwc
  1049. 1,nwlink.sys, SIZE=999,   BACKUP=nwlink.nwc
  1050. 1,nwnblink.sys, SIZE=999, BACKUP=nwnblink.nwc
  1051.  
  1052. [Files-nwcfgdll]
  1053. 1,nwcfg.dll, SIZE=999
  1054.  
  1055. [Files-NWWKSTA]
  1056. 2,nwsvc.exe, SIZE=999
  1057. 2,nwevent.dll , SIZE=999
  1058. 2,nwwks.dll   , SIZE=999
  1059. 2,nwprovau.dll, SIZE=999
  1060. 2,nwapi32.dll, SIZE=999
  1061. 2,nw16.exe, SIZE=999
  1062. 2,netware.drv, SIZE=999
  1063. 2,nwdoc.hlp, SIZE=999
  1064. 2,nwc.cpl, SIZE=999
  1065. 2,vwipxspx.dll, SIZE=999
  1066. 2,vwipxspx.exe, SIZE=999
  1067. 2,nwapi16.dll, SIZE=999
  1068. ;
  1069. 2,net.hlp,      SIZE=999, BACKUP=nethlp.nwc
  1070. 2,net.exe,      SIZE=999, BACKUP=net.nwc
  1071. 2,net1.exe,     SIZE=999
  1072. 2,netmsg.dll,   SIZE=999, BACKUP=netmsg.nwc
  1073. 2,srvsvc.dll,   SIZE=999, BACKUP=srvsvc.nwc
  1074. 2,ncpa.cpl,     SIZE=999, BACKUP=ncpa.nwc
  1075. 2,wfwnet.drv,   SIZE=999, BACKUP=wfwnet.nwc
  1076. 2,vdmredir.dll, SIZE=999, BACKUP=vdmredir.nwc
  1077. ;
  1078. 2,ipxroute.exe, SIZE=999, BACKUP=ipxroute.nwc
  1079. 2,nwlnkmsg.dll, SIZE=999, BACKUP=nwlnkmsg.nwc
  1080. 2,nwnblink.dll, SIZE=999, BACKUP=nwnblink.nwc
  1081. 2,wshnwlnk.dll, SIZE=999, BACKUP=wshnwlnk.nwc
  1082. 2,nwlnkcfg.dll, SIZE=999, BACKUP=nwlnkcfg.nwc
  1083. 2,nwlnksvc.exe, SIZE=999, BACKUP=nwlnksvc.nwc
  1084. 2,nwnblink.exe, SIZE=999, BACKUP=nwnbexe.nwc
  1085. ;
  1086. ; Performance Monitor
  1087. ;
  1088. 2,nwperf.ini, SIZE=999
  1089. 2,perfnw.dll, SIZE=999
  1090. 2,nwperfm.h, SIZE=999
  1091.  
  1092.